import {SendMessageType} from '/@/config/DeclareGlobal';
import Vector3 from '/@/core/bean/Vector3';
import sendToUnity from '/@/core/communication/SendToUnity';

export interface ChangeModelData {
  type: SendMessageType.ChangeModel;
  data: {
    name: string;
    position: Vector3;
    rotation: Vector3;
    scale: Vector3;
  };
}

export const changeModel = (data: ChangeModelData) => {
  sendToUnity.send(data);
};
export const chooseModel = (data: { name: string }) => {
  sendToUnity.send({
    type: SendMessageType.ChooseModel,
    data,
  });
};
export const FileLoadUrl = 'http://localhost:8089/';
